<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

require_once "fotoDAO.php";

class FotoBO{

    private $fotoDAO;

    function  __construct() {
        $this->fotoDAO = new FotoDAO();
    }

    public function novaFoto($idAlbum, $legenda, $caminho){
        
        $foto = new Foto($idAlbum, $legenda, $caminho);
        return $foto =  $this->fotoDAO->save($foto);
    }

    public function listFotosPorIdAlbum($idAlbum){
        return $this->fotoDAO->listFotosPorIdAlbum($idAlbum);
    }

    public function getFotoDAO() {
        return $this->fotoDAO;
    }

    public function setFotoDAO($fotoDAO) {
        $this->fotoDAO = $fotoDAO;
    }


}
?>